<html>
    <head>
        <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'>
        <meta http-equiv="content-type" content="text/html"; charset="utf-8" />
        <meta content="always" name="referrer"/>
        <link rel="stylesheet", type="text/css" href="./test.css"/>
        <!--项目编译后，文件目录不存在，都成了一级目录-->
<!--        <link rel="stylesheet" type="text/css" href="./css/test.css"/>-->
        <title>测试网页</title>
    </head>
    <body>
        <br />
        <h1 class="test">WebView</h1>
        <a href="devzeng://login?name=jinlong&password=000000">登录login链接</a>

        <br />

        <!--mapping jsCallOCFuntion方法-->
        <input type="button" value="按钮" onclick="native.jsFuntion(5);" />
        
        <br />
        <br />
        
        <input  type="button" name="push" value="push" onclick="native.pushViewControllerTitle('JSWebViewController','js push vc')">
        <a href="#" onclick="native.pushViewControllerTitle('WKWebViewController','wkWebView')">push to WKWebViewController</a>

        <br />
        <br />
        
        多参数
        <input type="button" name="minipara" value="多参数" onclick="mutiParams('参数一','5','string')" />

        <br />
        <br />
        
        <input type="button" value="addView" onclick="addView();" />

        <div id='buttons'>id is buttons</div>
        
        <div id='log'>id log div</div>
        
        <br/>
        <br/>
        接收oc返回值
        <input type="button" name"return" value="return" onclick="get_oc_return_value()"/>
        <div id="app">
                <div>
                    <input type="text" v-model="name"><br/>
                    <span v-show="name">你的名字是: {{name}}</span>
                </div>
            </div>
    </body>

    <script type="text/javascript">
        
        function log(message, data) {
            var log = document.getElementById('log')
            var el = document.createElement('div')
            el.className = 'logLine'
            el.innerHTML = 'message is:'+message + (data ? ',data is ->' + JSON.stringify(data) : '')
            
            if (log.children.length) {
                log.insertBefore(el, log.children[0])/*插入el 标签 在 log标签的第一个位置*/
            }
            else {
                log.appendChild(el)
                
            }
        }
    
        function get_oc_return_value()
        {
            var ocValue = native.jsFuntion(5);
            document.getElementById("log").innerHTML= ocValue;
            alert(ocValue);
        }
    
        </script>
        <script src="./vue.js"></script>
        <script src="./main.js"></script>
</html>
